/* eslint-disable */
// @ts-ignore
import request from '@/utils/http';

import * as API from './types';

/** 删除菜单 POST /api/rbacMenu/deleteData */
export async function apiRbacMenuDeleteDataUsingPost({
  body,
  options,
}: {
  body: API.ApiPositionBoApiRbacMenuDeleteData;
  options?: { [key: string]: unknown };
}) {
  return request<API.RBoolean>('/api/rbacMenu/deleteData', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 获取 POST /api/rbacMenu/getData */
export async function apiRbacMenuGetDataUsingPost({
  body,
  options,
}: {
  body: API.ApiRbacMenuBoApiRbacMenuGetData;
  options?: { [key: string]: unknown };
}) {
  return request<API.RApiRbacMenuVo>('/api/rbacMenu/getData', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 添加 POST /api/rbacMenu/saveData */
export async function apiRbacMenuSaveDataUsingPost({
  body,
  options,
}: {
  body: API.ApiRbacMenuBoApiRbacMenuSaveData;
  options?: { [key: string]: unknown };
}) {
  return request<API.RLong>('/api/rbacMenu/saveData', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 查询菜单树 POST /api/rbacMenu/treeData */
export async function apiRbacMenuTreeDataUsingPost({
  params,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.ApiRbacMenuTreeDataUsingPostParams;
  options?: { [key: string]: unknown };
}) {
  return request<API.RListApiRbacMenuTreeVo>('/api/rbacMenu/treeData', {
    method: 'POST',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 修改 POST /api/rbacMenu/updateData */
export async function apiRbacMenuUpdateDataUsingPost({
  body,
  options,
}: {
  body: API.ApiRbacMenuBo;
  options?: { [key: string]: unknown };
}) {
  return request<API.RBoolean>('/api/rbacMenu/updateData', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}
